package com.zixuan.yuojbackendjudgeservice.judge.codesandbox;

import com.zixuan.yuojbackendjudgeservice.judge.codesandbox.model.ExecuteCodeRequest;
import com.zixuan.yuojbackendjudgeservice.judge.codesandbox.model.ExecuteCodeResponse;

/**
 * @author Mr.Mei
 * @date 2023/11/14
 */
public class CodeSandBoxProxy implements CodeSandBox{

    private CodeSandBox codeSandBox;

    public CodeSandBoxProxy(CodeSandBox codeSandBox) {
        this.codeSandBox = codeSandBox;
    }

    @Override
    public ExecuteCodeResponse executeSandBox(ExecuteCodeRequest executeCodeRequest) {
        System.out.println("before====");
        ExecuteCodeResponse responseCodeSandBox = codeSandBox.executeSandBox(executeCodeRequest);
        System.out.println("after====");
        return responseCodeSandBox;
    }
}
